package core1.ch04class;

public class Singleton {
	private int i=0;
	private Singleton instance = new Singleton(i);
	

	private Singleton(int i) {
		System.out.println("instance init !"+(++i));
	}

	public Singleton getInstance() {
		return instance;
	}
	
	public static void main(String [] args){
		Singleton s1 =new Singleton(0);
		Singleton s2=s1.getInstance();
	}
}